package com.experian.web.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.client.RestTemplate;

import com.experian.daas.litigation.entity.Cart;

@Controller
public class IndexController {
	@Autowired
	private RestTemplate restTemplate;
	
	
	@RequestMapping("getCarts")
	@ResponseBody
	public List<Cart> getCarts(){
		List<Cart> carts = restTemplate.getForObject("http://localhost:9091/carts", List.class);
		return carts;
	}
}
